/*
 * Connection.java
 *
 * Created on June 25, 2006, 5:06 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package hubsniffer.conn ;

import hubsniffer.*;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.TimerTask;

/**
 *
 * @author root
 */
public interface Connection extends Runnable {
    
    public static enum STATE { LOCK, HELLO, CONNECTED };
    
    public static final int TIMEOUT_ATTEMPS = 5;
    
    
    public DCHub getHub();
    public void disconnect() throws UnsupportedEncodingException, IOException;

    void setTimer(TimerTask hubDisconnect);
}
